import request from '@/config/axios'
import type {
    MonthlyCourse,
    user
} from './types'
/* 上传视频总数 */
export const getCountApi = () => {
  return request.get({ url: 'http://localhost:8081/teacherSystem/selVideoCount'})
}
/* 上传视频浏览数 */
export const getUserAccessSourceApi = () => {
  return request.get({ url: 'http://localhost:8081/teacherSystem/selVideoLook' })
}
/* 视频收藏量 */
export const getWeeklyUserActivityApi = () => {
  return request.get({ url: 'http://localhost:8081/teacherSystem/selVideoCollect' })
}
/* 视频点击量 */
export const getMonthlySalesApi = () => {
  return request.get({ url: 'http://localhost:8081/teacherSystem/selVideoLike' })
}
/* 折线图 */
export const getMonthlyCourse = (): Promise<IResponse<MonthlyCourse[]>> => {
    return request.post({ url: 'http://localhost:8081/teacherSystem/selCurriculumCount' })
}


/* 商品总览（课程数量已上架） */
export const overviewCourse = (): Promise<IResponse<user[]>> => {
    return request.get({ url: 'http://localhost:8081/teacherSystem/selCourseStatus' })
}
/* 商品总览（商品数量已上架） */
export const overviewShopping = (): Promise<IResponse<user[]>> => {
    return request.get({ url: 'http://localhost:8081/teacherSystem/selProductSate' })
}

/* 用户总览（今日新增） */
export const todayAccount = (): Promise<IResponse<user[]>> => {
    return request.get({ url: 'http://localhost:8081/teacherSystem/selUserOverviewToday' })
}
/* 用户总览（昨日新增） */
export const yesterdayAccount = (): Promise<IResponse<user[]>> => {
    return request.get({ url: 'http://localhost:8081/teacherSystem/selUserOverviewYesterday' })
}
/* 用户总览（本月新增） */
export const monthAccount = (): Promise<IResponse<user[]>> => {
    return request.get({ url: 'http://localhost:8081/teacherSystem/selUserOverviewMonth' })
}
/* 用户总览（全部用户） */
export const allUsers = (): Promise<IResponse<user[]>> => {
    return request.get({ url: 'http://localhost:8081/teacherSystem/selUserOverviewCount' })
}